package cn.edu.lingnan.service;

import cn.edu.lingnan.dao.ProjectDao;
import cn.edu.lingnan.dao.ProjectDaoImp;
import cn.edu.lingnan.pojo.Project;
import cn.edu.lingnan.pojo.ProjectAdult;

import java.util.List;

public class ProjectServiceImp  implements ProjectService{
    private ProjectDao projectDao = new ProjectDaoImp();
    @Override
    public List<Project> queryAllProjects(Integer page, Integer pageSize) {
        return projectDao.queryAllProjects( page, pageSize);
    }

    @Override
    public List<Project> queryMyProjects(String sname) {
        return  projectDao.queryMyProjects(sname);
    }

    @Override
    public List<Project> queryNoProjects(String sname) {
        return  projectDao.queryNoProjects(sname);
    }

    @Override
    public Project queryProjectById(Integer projectId) {
        return  projectDao.queryProjectById(projectId);
    }

    @Override
    public Integer StudentInsertProject(String sname, Integer projectId, Integer userId) {
        return  projectDao.StudentInsertProject( sname, projectId, userId);
    }

    @Override
    public Integer AdminInsertProject(Project project) {
        return  projectDao.AdminInsertProject(project);
    }

    @Override
    public Integer updateProject(Project project) {
        return  projectDao.updateProject(project);
    }

    @Override
    public Integer deleteProject(Integer[] projectIds) {
        return  projectDao.deleteProject(projectIds);
    }

    @Override
    public Integer AgreeProject(Integer projectId, Integer status) {
        return  projectDao.AgreeProject(projectId, status);
    }

    @Override
    public Integer RejectedProject(Integer projectId, Integer status, String reason) {
        return  projectDao.RejectedProject(projectId, status, reason);
    }

    @Override
    public List<Project> QueryRejectedProject(String sname) {
        return  projectDao.QueryRejectedProject(sname);
    }

    @Override
    public Integer countProject() {
        return  projectDao.countProject();
    }

    @Override
    public List<Project> queryProjectLikeName(String sname) {
        return  projectDao.queryProjectLikeName(sname);
    }

    @Override
    public Integer deleteInsertProject(Integer projectId) {
        return  projectDao.deleteInsertProject(projectId);
    }

    @Override
    public List<ProjectAdult> studentqueryaduitProject(Integer userId) {
        return projectDao.studentqueryaduitProject(userId);
    }

    @Override
    public List<Project> querymyEnterProject(String sname) {
        return  projectDao.querymyEnterProject(sname);
    }

    @Override
    public List<ProjectAdult> queryaduitProject() {
        return projectDao.queryaduitProject();
    }

    @Override
    public Integer AgreeEnterProject(Integer projectId, String sname) {
        return  projectDao.AgreeEnterProject(projectId, sname);
    }

    @Override
    public Integer StudnetCreateProject(Project project) {
        return  projectDao.StudnetCreateProject(project);
    }

    @Override
    public List<Project> StudentQueryCreateAdultProject(String sname) {
        return  projectDao.StudentQueryCreateAdultProject(sname);
    }

    @Override
    public Integer StudentDeleteProjectCreateAdultProject(Integer projectId, String sname) {
        return  projectDao.StudentDeleteProjectCreateAdultProject(projectId, sname);
    }

    @Override
    public List<Project> QueryStudnetCreateProject() {
        return  projectDao.QueryStudnetCreateProject();
    }
}
